[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 - Added a SORT statement to sort the contents of an array into a pointer
   array.

   Syntax:
    SORT sortArray,pointerArray

    sortArray    = The data to sort (Any type may be used for this array)
    pointerArray = An integer array which will be used as an array of
                   pointers into sortArray for accessing sortArray in
                   sorted order (This array should be of type INTEGER)

   Note that sortArray and pointerArray are restricted to one (1) dimensional
   arrays.

   The following is an example of displaying an array in unsorted and sorted
   order:

    STRING  s(999) ; Remember that arrays are 0-based, so these statements
    INTEGER p(999) ; will allocate 1000 elements each
    ; Do something here to read data into s
    SORT s,p
    INTEGER i
    FOR i = 0 TO 999 ; This loop will display in unsorted order
      PRINTLN s(i)
    NEXT
    FOR i = 0 TO 999 ; This loop will display in sorted order
      PRINTLN s(p(i))
    NEXT

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson